<div class="bjui-pageHeader">
    <form id="pagerForm" data-toggle="ajaxsearch" action="${ctx}/system/resource/list" method="POST">
        <input type="hidden" name="pageSize" value="${pageInfo.pageSize}">
        <input type="hidden" name="pageNum" value="${pageInfo.pageNum}">
        <input type="hidden" name="resourceId" value="${resource.resourceId!}">
        <input type="hidden" name="parentIds" value="${resource.parentIds!}">
        <div class="bjui-searchBar">
            <label>资源名称：</label><input type="text" name="resourceName" value="${resource.resourceName!}"/>
            <label>状态:</label>
            <@h.select name="available" list=fn.getDicValue('AVAILABLE_STATUS') value=resource.available defaultOptions= {"":"全部"}/>
            <button type="submit" class="btn-default" data-icon="search">查询</button>
            <div class="pull-right">
                <div class="btn-group">
                    <button type="button" class="btn-default dropdown-toggle" data-toggle="dropdown" data-icon="copy">功能操作<span class="caret"></span></button>
                    <ul class="dropdown-menu right" role="menu">
                        
                    </ul>
                </div>
            </div>
        </div>
    </form>
</div>
<div class="bjui-pageContent tableContent">
    <table data-toggle="tablefixed"  data-width="100%">
	    <thead>
	        <tr>
	            <th>资源名称</th>
	            <th>资源类型</th>
	            <th>URL路径</th>
	            <th>权限字符串</th>
	            <th>状态</th>           	
	            <th align="center">操作</th>
	        </tr>
	    </thead>
	    <tbody>
	        <#list pageInfo.list as resource>
	            <tr>
	                <td>${resource.resourceName}</td>
	                <td>${fn.getDicValue('RESOURCE_TYPE_CODE',resource.resourceTypeCode)!}</td>
	                <td>${resource.resourceUrl}</td>
	                <td>${resource.resourcePermission}</td> 
	                <td>${fn.getDicValue('AVAILABLE_STATUS',resource.available)!}</td>	
	                <td>   
	                	<#if resource.resourceTypeCode!='ROOT'>                 
	                    <shiro:hasPermission name="resource:update">
	                        <a href="${ctx}/system/resource/${resource.resourceId}/edit" class="btn btn-default btn-sm" data-toggle="dialog" data-id="dialog-mask" data-mask="false">修改</a>
	                    </shiro:hasPermission>	                    	
	                    <shiro:hasPermission name="resource:delete">
	                        <a href="${ctx}/system/resource/${resource.resourceId}/delete" class="btn btn-default btn-sm" data-toggle="doajax" data-confirm-msg="确定要删除吗？" data-callback="deleteCallback">删除</a>
	                    </shiro:hasPermission>	  
	                    </#if> 
	                                      
	                    <shiro:hasPermission name="resource:create">
	                        <#if resource.resourceTypeCode!='BUTTON'>
	                        	<a href="${ctx}/system/resource/create?parentId=${resource.resourceId}" class="btn btn-default btn-sm" data-toggle="dialog" data-id="dialog-mask">添加子节点</a>
	                        </#if>
	                    </shiro:hasPermission>	
	                </td>
	            </tr>
	        </#list>
	    </tbody>
	</table>
</div>
<@h.pageFooter />